<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        margin: 0;
        transform-style: preserve-3d;
        perspective: 1000px;
      }
      .box {
        margin: 100px auto;
        width: 300px;
        height: 300px;
        border: 1px solid;
        background-color: red;
        /* 过度效果 */
        transition: all 1s linear;
        cursor: pointer;
        animation: big 2s linear 0s 1;
      }
      .box:hover {
        /* transform: translate(100px, 100px) rotateZ(360deg); */
        /* transform: scale(0.5, 0.7); */
        /* transform: translateZ(-200px); */
      }

      /* @keyframes circle {
        from {
          transform: rotate(0deg);
        }
        to {
          transform: rotate(360deg);
        }
      } */
      @keyframes big {
        0% {
          width: 0px;
          background-color: antiquewhite;
          opacity: 0;
        }
        25% {
          width: 100px;
          background-color: aquamarine;
        }
        50% {
          width: 200px;
          background-color: blue;
        }
        75% {
          width: 250px;
        }
        100% {
          width: 300px;
          opacity: 1;
        }
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
  </body>
</html>
